home *** CD-ROM | disk | FTP | other *** search
- On 26-May-97, --==MURRAY==-- wrote:
-
- >>>Say for a horizontal scrolling system. Using offset to move along
- >>>and then every 16 or 32 pixels, it copys the screen across to the
- >>>left, draws the side, resets the screen offset and continues.
-
- >>Okay, you realize this is never going to be very fast. Transfering
- >>such a huge block of ChipRAM via the blitter is a BIG bottleneck...
-
- >How would you recommend then?
- >(It's actually 8 way scroller I'm talking about, just the example
- >was horizontal)
-
-
- Create a more optimized-design so you are never actually
- directly "scrolling" the screen.
-
- I can give you a general idea, but I need the specific
- requirements of the scroll/game.
-
- Now, do you need to update the (scrolling) background scenery,
- like blowing up buildings and such?
-
- Finally, can you work with the OCS/ECS Dual-Playfield mode?
-
-
-
- Alright, for now, here is the general design:
-
- 1. Create your screen (buffered)with a scroll "buffer", the size of
- one tile, on each side.
-
- For a 320x240 visible game-area with 16hx16v tiles, you would
- open a 352hx272v screen.
-
- 2. Initialize the stage-display
-
- As usual, build your first section of the stage by drawing the
- tiles into your 352hx272v screen and display the 320hx240v
- area in the center: Screen Offset ScreenNumber,16,16
-
- So far, so good.
-
- 3. Now, for the fun!! The actual scrolling design is:
-
- we can hardware-scroll one tile (16 pixels) in any direction.
-
- While we are hardware-scrolling, we need to rebuild the bitmap
- with the entire screen "shifted" by one tile-block.
-
- Once the hardware-scroll is exhausted, we swap the new
- "shifted" stage into view and reset the Offset to x=16,y=16.
-
-
- In this example, you would need to draw (22h x 15v) 330 tiles in
- order to rebuild the screen, BUT you actually have 16 frames to
- do this in.
- An obvious method would be to draw one row of tiles in each
- frame, now you are only drawing 22 tiles at any one time.
-
- Note that by increasing the size of the scroll-border, you can
- stretch out the hardware scroll and reduce the number of tiles
- blitted in one frame...
-
-
- Obviously, this is MUCH easier to use in Dual-playfield displays
- as you don't have to worry about your bobs getting in the way!!
-
- Hmmm... how to do it in AMOS without Dual-Playfield!! It has no
- direct support for bitmaps which makes the whole process a bit
- trickier. Working within AMOS you would need to actually create
- a second Game-screen.
-
-
- HA!HA! Well, are you confused now?
-
- I really need to do some work on the shooter, but I will have a go
- (time permitting) at implementing a non Dual-playfield version of
- this scroll-design.
-
- You may want to wait and try this method in the AGA extension.
- We're using AGA Dual-playfield in our BLITZ game for the scroll
- benefits as well as the fact that AGA DP has 16+16 colors!!
-
-
-
- Take care,
-
- Garfield
-
-
-
-